package com.hmall.model;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigInteger;
import java.util.Date;

@Data
@Table(name = "mall_push_message")
public class MallPushMessage {
    @Id
    @Column(name = "message_id")
    private Integer messageId;

    @Column(name = "message_no")
    private Long messageNo;

    /**
     * 标题
     */
    private String title;

    private String subtitle;

    /**
     * 0 代表未读 1 代表已读
     */
    @Column(name = "is_read")
    private Integer isRead;

    /**
     * 用户名
     */
    private String username;

    /**
     * 类别
     */
    private String type;

    private String params;

    /**
     * 值
     */
    private String body;

    /**
     * 附加字段1
     */
    private String extra1;

    /**
     * 附加字段2
     */
    private String extra2;

    /**
     * 附加字段3
     */
    private String extra3;

    @Column(name = "create_time")
    private Date createTime;

    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 设备状态 1 手机 2 PC
     */
    @Column(name = "device_type")
    private Integer deviceType;

    /**
     * 是否广播 
     */
    @Column(name = "is_public")
    private Integer isPublic;

    /**
     * 是否启用
     */
    private Integer enable;

    /**
     * 最细userId
     */
    @Column(name = "user_id")
    private Integer userId;

    @Override
    public String toString() {
        return "MallPushMessage{" +
                "messageId=" + messageId +
                ", messageNo=" + messageNo +
                ", title='" + title + '\'' +
                ", subtitle='" + subtitle + '\'' +
                ", isRead=" + isRead +
                ", username='" + username + '\'' +
                ", type='" + type + '\'' +
                ", params='" + params + '\'' +
                ", body='" + body + '\'' +
                ", extra1='" + extra1 + '\'' +
                ", extra2='" + extra2 + '\'' +
                ", extra3='" + extra3 + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", deviceType=" + deviceType +
                ", isPublic=" + isPublic +
                ", enable=" + enable +
                ", userId=" + userId +
                '}';
    }
}